package Day015_File类_递归_IO流.ZuoYe;

/**
 * @author zhangyan
 * @date 2020/5/6 17:51
 */
public class Test3 {
    public static void main(String[] args) {

        System.out.println(getSum(100));
    }

    public static int getSum(int i){
        //设置出口
        if (i == 1){
            return 1;
        }
        return i + getSum(i-1);
    }
}
